From fdc8b5a205e2116408aeb9fd305e57f656e2e89d Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sun, 9 Aug 2020 17:06:26 +0200
Subject: [PATCH] src/util/rand_xor: Include stddef.h to fix build error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes

In file included from ../src/util/rand_xor.c:29:
output/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35:
 error: unknown type name ‘size_t’
 extern int getrandom(void *__buf, size_t count, unsigned int flags)

seen with gcc version 8.3.0 (Buildroot 2020.02) and uClibc.

Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6248

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 src/util/rand_xor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c
index 81b64f1ea71..fcb481487fa 100644
--- a/src/util/rand_xor.c
+++ b/src/util/rand_xor.c
@@ -25,6 +25,7 @@
 #include "detect_os.h"
 
 #if !DETECT_OS_WINDOWS
+#include <stddef.h>
 #if defined(HAVE_GETRANDOM)
 #include <sys/random.h>
 #endif
-- 
2.27.0

